﻿<link href="@Url.Content("~/Content/ar_calendar.css")" rel="stylesheet" />
@{
    ViewBag.Title = "Meeting Management";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@Html.Raw(TempData["msg"])
<script src="@Url.Content("~/Scripts/daypilot-all.min.js")" type="text/javascript"></script>
<h2>Meeting Management</h2>
@if (User.IsInRole("Teacher"))
{
    @Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig
{
    Theme = "ar_calendar",
    BackendUrl = Url.Content("~/Meeting/Backend"),
    ViewType = DayPilot.Web.Mvc.Enums.Calendar.ViewType.Week,
    EventMoveHandling = DayPilot.Web.Mvc.Events.Calendar.EventMoveHandlingType.CallBack,
    EventResizeHandling = DayPilot.Web.Mvc.Events.Calendar.EventResizeHandlingType.CallBack,
    TimeRangeSelectedHandling = DayPilot.Web.Mvc.Events.Calendar.TimeRangeSelectedHandlingType.JavaScript,
    EventClickHandling = DayPilot.Web.Mvc.Events.Calendar.EventClickHandlingType.CallBack,
    TimeRangeSelectedJavaScript = "dpc.timeRangeSelectedCallBack(start, end, null, { name: prompt('New Meeting Event Name:'), content: prompt('Input Meeting Event Content:')});"
})
}
else
{
    @Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig
{
    Theme = "ar_calendar",
    BackendUrl = Url.Content("~/Meeting/StudentMeeting"),
    ViewType = DayPilot.Web.Mvc.Enums.Calendar.ViewType.Week,
    EventClickHandling = DayPilot.Web.Mvc.Events.Calendar.EventClickHandlingType.CallBack,
})
}
